<div class="row">
    <div class="span9">
        <form method="post">
            <input type="hidden" name="action" value="save_changes" />
            <fieldset>
                <legend>Main settings</legend>
                <div class="clearfix">
                    <label>Title</label>
                    <div class="input">
                        <input class="span6" name="title" value="<?php echo $title; ?>" />
                    </div>
                </div>
                <div class="clearfix">
                    <label>Description</label>
                    <div class="input">
                        <input class="span6" name="description" value="<?php echo $description; ?>" />
                    </div>
                </div>
                <div class="clearfix">
                    <label>Keywords</label>
                    <div class="input">
                        <input class="span6" name="keywords" value="<?php echo $keywords; ?>" />
                    </div>
                </div>
                <div class="clearfix">
                    <label>Default language</label>
                    <div class="input">
                        <ul class="inputs-list">
                            <?php foreach ($languages as $lang => $desc): ?>
                            <?php $selected = $default_language == $lang ? ' checked' : ''; ?>
                            <li>
                                <label>
                                    <input type="radio" name="default_language" value="<?php echo $lang; ?>"<?php echo $selected; ?> />
                                    <span><?php echo $lang; ?></span>
                                </label>
                            </li>
                            <?php endforeach; ?>
                        </ul>
                    </div>
                </div>
                <div class="actions">
                    <button type="submit" class="btn primary">Save changes</button>
                </div>
            </fieldset>
        </form>
        <br />
        <form method="post">
            <input type="hidden" name="action" value="change_password" />
            <fieldset>
                <legend>Change account password</legend>
                <div class="clearfix">
                    <label>Old password</label>
                    <div class="input">
                        <input name="old_password" />
                    </div>
                </div>
                <div class="clearfix">
                    <label>New password</label>
                    <div class="input">
                        <input name="new_password" />
                    </div>
                </div>
                <div class="clearfix">
                    <div class="input">
                        <input name="rpt_password" />
                        <div class="help-block">Repeat new password</div>
                    </div>
                </div>
                <div class="actions">
                    <button type="submit" class="btn primary">Change password</button>
                </div>
            </fieldset>
        </form>

    </div>

    <div class="span5">
        <h3><?php echo __('Languages'); ?></h3>
        <?php foreach ($languages as $lang => $desc): ?>
        <form method="post" class="form-stacked">
            <input type="hidden" name="language" value="<?php echo $lang ?>" />
            <fieldset>
                <div class="row">
                    <div class="span2 clearfix">
                        <label>Language</label>
                        <div class="input">
                            <input class="span2" name="lang" value="<?php echo $lang; ?>" />
                        </div>
                    </div>
                    <div class="span2 clearfix">
                        <label>Description</label>
                        <div class="input">
                            <input class="span2" name="desc" value="<?php echo $desc; ?>" />
                        </div>
                    </div>
                </div>
                <div class="actions small">
                    <button type="submit" name="save_language" value="true" class="btn primary">Save</button>
                    <button type="submit" name="remove_language" value="true" class="btn error">Remove</button>
                </div>
            </fieldset>
        </form>
        <?php endforeach; ?>
        
        <form method="post" class="form-stacked">
            <input type="hidden" name="action" value="add_language" />
            <fieldset>
                <legend>Add new language</legend>
                <div class="row">
                    <div class="span2 clearfix">
                        <label>Language</label>
                        <div class="input">
                            <input class="span2" name="lang" required />
                        </div>
                    </div>
                    <div class="span2 clearfix">
                        <label>Description</label>
                        <div class="input">
                            <input class="span2" name="desc" required />
                        </div>
                    </div>
                </div>
                <div class="actions small">
                    <button type="submit" class="btn primary">Add</button>
                </div>
            </fieldset>
        </form>
    </div>
</div>